<template>
  <view @click="$emit('click')" class="life-button" :class="{'isFixed':isFixed}" :style="{backgroundColor: bgColor,
	color:color}">
    <image v-if='icon' :src="icon" mode=""></image>
    <text>
      <slot />
    </text>
  </view>
</template>

<script>
  export default {
    name: "life-button",
    props: {
      bgColor: {
        type: String,
        default: "#fff"
      },
      color: {
        type: String,
        default: '#000'
      },
      icon: {
        type: String,
      },
      isFixed: {
        type: Boolean,
        default: true
      }
    },
    data() {
      return {

      };
    },

  }
</script>

<style lang="scss" scoped>
  .isFixed {
    position: fixed;
    left: 0;
    bottom: 0;
  }

  .life-button {
    width: 750rpx;
    height: 213rpx;
    // background: #5591AF;
    z-index: 999;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    image {
      width: 50rpx;
      height: 50rpx;
      margin-bottom: 20rpx;
    }

    text {
      // color: #FFFFFF;
      font-size: 30rpx;
    }
  }
</style>
